import React from 'react';
import { Row } from 'antd';

const Index = props => {
  const {
    justify = 'start', // flex 布局下的水平排列方式：start end center space-around space-between
    align = 'middle', // flex 布局下的垂直对齐方式：top middle bottom
    gutter = 16, // 栅格间隔，可以写成像素值或支持响应式的对象写法 { xs: 8, sm: 16, md: 24}
    ...rest
  } = props;

  return <Row justify={justify} align={align} gutter={gutter} {...rest} />;
};

Object.keys(Row).forEach(item => {
  if (!['defaultProps'].includes(item)) {
    Index[item] = Row[item];
  }
});
Index.displayName = 'Row';
export default Index;
